package com.itheima.day05.zuoye.ZuoYe4;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Scanner;

public class New {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy年MM月dd日");
        System.out.println("请输入第一个人的生日：（/年/月/日）");
        String birth1 = sc.next();
        System.out.println("请输入第二个人的生日：（/年/月/日）");
        String birth2 = sc.next();
        LocalDate brith3 = LocalDate.parse(birth1, dtf);
        LocalDate brith4 = LocalDate.parse(birth2, dtf);
        if(brith3.isAfter(brith4)){
            System.out.println("第一个人年龄更小一些");
        }
        else if(brith3.equals(brith4)){
            System.out.println("两个人年龄相同");
        }
        else{
            System.out.println("第两个人年龄更小一些");
        }

    }
}
